package com.tx.springboot_demo.service.impl.connection;

import com.tx.springboot_demo.dao.IBookDao;
import com.tx.springboot_demo.domain.Book;
import com.tx.springboot_demo.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：tx
 * @description：
 * @date ：Created in 2019/4/10 17:41
 * @modified By：
 * @version:
 */
@Service
public class BookServiceImpl implements IBookService {

    @Autowired
    IBookDao bookDao;

    @Override
    public void addBook(Book book) {
        bookDao.addBook(book);
    }

    @Override
    public void deleteBook(Book book) {
        bookDao.deleteBook(book);
    }

    @Override
    public void updateBook(Book book) {
        bookDao.updateBook(book);
    }

    @Override
    public List<Book> findBooks() {
        return bookDao.findBooks();
    }
}
